package com.zx.cloud.security.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhaoxuan
 * @date 2021-08-20 14:19
 **/
//@Configuration
public class KafkaInitialConfiguration {
    /**
     * 创建TopicName为my-replicated-topic的Topic并设置分区数为8以及副本数为1
     * @return
     */
    @Bean
    public NewTopic initialTopic() {
        return new NewTopic("my-replicated-topic",2, (short) 1 );
    }
}
